<tr class="{{if ($_errors.$name)|default}}error{{/if}}">
<th>
{{if $column_name|default}}{{$smarty.config.$column_name}}{{else}}{{$smarty.config.$name}}{{/if}}
{{($_errors.$name)|default}}
</th>
<td>
{{if $type eq 'id'}}
{{if $data->$name}}{{$data->$name}}{{else}}{{$smarty.config.newpost}}{{/if}}
<input
 type="hidden"
 name="{{$name}}"
 value="{{($data->$name)|default:0}}" />
{{*-------------------*}}{{else if $type eq 'text'}}
<input
 type="text"
 name="{{$name}}"
 value="{{$data->$name}}{{$default|default}}"
 autocomplete="{{if $autocomplete|default}}on{{else}}off{{/if}}"
 palceholder="{{$placeholder|default}}" 
{{if $minimum|default}} minlength="{{$minimum}}"
{{/if}}
{{if $limit|default}} maxlength="{{$limit}}"
{{/if}}
 class="{{$class}} {{*
*}}{{if $hiragana|default}}form_hiragana {{/if}}{{*
*}}{{if $alphabet|default}}form_alphabet {{/if}}{{*
*}}{{if $number|default}}form_number {{/if}}{{*
*}}{{if $pass|default}}form_pass {{/if}}{{*
*}}{{if $repass|default}}form_repass {{/if}}{{*
*}}{{if $minimum|default}}form_minimum {{/if}}"
{{if $alphabet|default || $number|default}} style="ime-mode: disabled"{{/if}}
/>
{{*-------------------*}}{{else if $type eq 'textarea'}}
<textarea
 name="{{$name}}"
 palceholder="{{$placeholder|default}}"
 class="
{{if $mail|default}}form_mail {{/if}}
{{if $alphabet|default}}form_alphabet {{/if}}
{{if $number|default}}form_number {{/if}}
{{$class}}"
{{if $alphabet|default || $number|default}} style="ime-mode: disabled"{{/if}}
>{{$data->$name}}</textarea>
{{*-------------------*}}{{else if $type eq 'release'}}
<input
 type="text"
 name="{{$name}}"
 value="{{$data->$name}}"
 autocomplete="{{if $autocomplete|default}}on{{else}}off{{/if}}"
 palceholder="{{$placeholder|default}}" 
 minlength="8" maxlength="8"
 class="mini form_release" style="ime-mode: disabled" />
<span class="form_release_result">{{$smarty.config.shown}}：<span></span></span>
{{*-------------------*}}{{else if $type eq 'ymd'}}
{{if $isAllowBlank|default}}
{{html_select_date time=($data->$name)|default:0 start_year="1920" month_format='%m' field_order=YMD prefix='' field_array='_birthday'
  year_empty='年' month_empty='月' day_empty='日'
}}
{{else}}
{{html_select_date time=($data->$name)|default:0 start_year="1920" month_format='%m' field_order=YMD prefix='' field_array='_birthday'}}
{{/if}}
{{*-------------------*}}{{else if $type eq 'select'}}
<select name="{{$name}}">
{{if $values|default}}
{{foreach $values as $k => $v}}
<option value="{{$v}}" {{if $data->$name eq $v}}selected="selected" {{/if}}>{{$smarty.config[$labels.$k]}}</option>
{{/foreach}}
{{else}}
{{foreach $labels as $k => $v}}
<option value="{{$k}}" {{if $data->$name eq $k}}selected="selected" {{/if}}>{{$smarty.config.$v}}</option>
{{/foreach}}
{{/if}}
</select>
{{*-------------------*}}{{else if $type eq 'checkbox'}}
{{if !is_array(($data->$name)|default)}}{{$array = $data->$name|pgstr2ary}}{{else}}{{$array = $data->$name}}{{/if}}
{{foreach $values as $k => $v}}
<label><input type="checkbox" name="{{$name}}[]" value="{{$v}}" {{if $array|is_array and $v|in_array:$array}}checked="checked" {{/if}} />{{$labels.$k}}</label>
{{/foreach}}
{{*-------------------*}}{{else if $type eq 'radio'}}
{{foreach $values as $k => $v}}
<label><input type="radio" name="{{$name}}" value="{{$v}}" {{if $data->$name eq $v}}checked="checked" {{/if}} />{{$labels.$k}}</label>
{{/foreach}}
{{/if}}
</td>
</tr>